package br.inf.solutions.apresentacoes.ssp.control;

import java.util.List;

import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Service;

import br.com.vexillum.util.Return;
import br.inf.solutions.apresentacoes.ssp.control.basics.BasicFormsController;
import br.inf.solutions.apresentacoes.ssp.model.Neighborhood;
import br.inf.solutions.apresentacoes.ssp.model.basics.SectorAddress;

@Service
@Scope("prototype")
public class SectorCollectionController extends BasicFormsController<SectorAddress>{

	public SectorCollectionController() {
		super(SectorAddress.class);		
	}
		
	@SuppressWarnings("unchecked")
	public Return AddNeighborhoodList() {
		Return ret = new Return(true);
		List<Neighborhood> neighborhood = (List<Neighborhood>) data.get("lstBairro");
		neighborhood.add((Neighborhood) data.get("bairro"));
		return ret;
	}
}